<?php

class Models extends Controller
{
	var $data=array();

	public function __construct() 
	{
		parent::Controller();	
		$this->data['images_dir_url'] =  base_url().'images/';
	}
	
	function index()
	{
		$this->load->database();
		$this->load->model('File_Info_Model');
		$this->load->model('Item_Model');

		$this->data['edit_item_id']=17;
		$result=$this->Item_Model->get_item_information(17);
		
		foreach($result as $item)
		{
			$this->data['description_heading']=$item->title;
			$this->data['item_description']=$item->description;
		}
		
		$this->data['item_images']=$this->File_Info_Model->get_item_images($this->data['edit_item_id']);
		$this->load->view("models",$this->data);
	}
}
?>